home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1993 Robert Davis
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of Version 2, or any later version, of
- * the GNU General Public License as published by the Free Software
- * Foundation.
- */
-
-
- static char RCSId[]="$Id: SubObject.m,v 1.3 1993/05/04 16:22:59 davis Exp $";
-
-
- #import <objc/hashtable.h> /* NXCopyStringBufferFromZone() */
- #import <objc/zone.h>
-
- #import "SubObject.h"
-
- @implementation SubObject
-
- - init
- {
- [super init];
- stringValue = NULL;
- return self;
- }
-
-
- - initFromString:(const char *)aString
- {
- [super init];
-
- [self setStringValue:aString];
- return self;
- }
-
-
- - free
- {
- NXZoneFree ([self zone], stringValue);
- return [super free];
- }
-
-
- - setStringValue:(const char *)aString
- {
- NXZone *zone = [self zone];
-
- NXZoneFree (zone, stringValue);
-
- if (aString && *aString)
- stringValue = NXCopyStringBufferFromZone (aString, zone);
- else
- stringValue = NULL;
-
- return self;
- }
-
-
- - (const char *)stringValue
- {
- return stringValue;
- }
-
-
- - (BOOL)isAttachment
- {
- return NO;
- }
-
-
- // Shuts up the compiler about unused RCSId
- - (const char *) rcsid
- {
- return RCSId;
- }
-
-
- @end
-